<?php
function smarty_function_categories($params, &$smarty)
{
	set_include_path(			
			PATH_SEPARATOR . ROOT_DIR .'/' . MOD_FRONTEND .'/models/' .
			PATH_SEPARATOR . get_include_path()
		);
	$intType		= isset($params['type']) ? $params['type'] : EDUCATION_TYPE;
	$objCategory	= new Category();
	$arrCategory	= $objCategory->getParent($intType);
	$smarty->assign('catagories', $arrCategory);
	$smarty->assign('categoryType', $intType);
	$smarty->display(ROOT_DIR . '/library/Ecore/Plugins/Tpl/categories.tpl');
}